/* eslint valid-jsdoc: "off" */

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
	/**
	 * built-in config
	 * @type {Egg.EggAppConfig}
	 **/

	const config = exports = {};
	config.cors = {
		origin: '*'
	}
	//关闭csrf
	config.security = {
		csrf: {
			enable: false
		}
	}
	//开启文件模式
	config.multipart = {
		mode: 'file',
	};

	config.session = {
		key: 'HQYJ_SSION',
		maxAge: 24 * 3600 * 1000, // 1 天
		httpOnly: true,
		encrypt: true,
	};

	config.mysql = {
		client: {
			//host
			host: "47.109.72.26",
			//端口
			port: "3306",
			//用户名
			user: "root",
			//密码
			password: "root",
			//数据库名
			database: "bizi"
		}
	}
	// use for cookie sign key, should change to your own and keep security
	config.keys = appInfo.name + '_1704607873700_5410';

	// add your middleware config here
	config.middleware = [];

	// add your user config here
	const userConfig = {
		// myAppName: 'egg',
	};

	return {
		...config,
		...userConfig,
	};
};